{extend name="admin@public/base_content" /}
{block name="body">}
<body>
{include file="admin@public/common" /}
<!--头部搜索开始-->
<div class="container-fluid larry-wrapper">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12">
            <section class="panel panel-padding">
                <form class="layui-form" action="{:url('')}">
                    <div class="layui-form">
                        <div class="layui-inline">
                            <div class="layui-input-inline">
                                <input class="layui-input" name="scope_name" value="{:input('scope_name')}" placeholder="应用名称">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <select name="status">
                                <option value="0">选择状态</option>
                                <option value="1" {if condition="input('status') eq 1"} selected{/if}>显示</option>
                                <option value="2" {if condition="input('status') eq 2"} selected{/if}>关闭</option>
                            </select>
                        </div>
                        <div class="layui-inline">
                            <button lay-submit class="layui-btn" lay-filter="search">查找</button>
                        </div>
                    </div>
                </form>
            </section>
        </div>
    </div>
</div>
<!--头部搜索结束-->
<div class="layui-form">
    <table class="layui-table lay-even">
        <thead>
        <tr>
            <th width="180" style="text-align:center;color: #333;">应用图片</th>
            <th width="180" style="text-align:center;color: #333;">应用名称</th>
            <th style="text-align:center;color: #333;">备注</th>
            <th width="180" style="text-align:center;color: #333;">创建时间</th>
            <th width="150" style="text-align:center;color: #333;">操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="list" id="v"}
        <tr>
            <td style="text-align:center;color: #333;">{if condition="$v.scope_image !=''"}<img src="{$v.scope_image}" width="120px" height="70px" class="surface" surface_img="{$v.scope_image}">{else/}暂无图片{/if}</td>
            <td style="text-align:center;color: #333;">{$v.scope_name}</td>
            <td style="text-align:center;color: #333;">{$v.content}</td>
            <td style="text-align:center;color: #333;">{:date('Y-m-d',$v['create_time'])}</td>
            <td style="text-align:center;color: #333;">
                <a href="scopeAdd.html?id={$v.id}" class="layui-btn layui-btn-mini modal-catch"><i class="iconfont">&#xe653;</i>编辑</a>
                <a class="layui-btn layui-btn-mini layui-btn-danger ajax"
                   data-list='{"key":"id={$v.id}","msg":true,"render":"true","action":"del"}'
                   data-params='{"url": "{:url("scopeDel")}","confirm":"true","data":"id={$v.id}","complete":"del"}'>
                    <i class="iconfont">&#xe626;</i>删除
                </a>
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
</div>
<div class="text-right">
    <div class="layui-box layui-laypage layui-laypage-molv" id="layui-laypage-1">
        {$page}
    </div>
</div>
</body>
{/block}
{block name="script"}
<script src="__ADMIN__/js/jquery/jquery.min.js"></script>
<script>
    layui.use('default');
</script>
<script>
    //图片弹出层function MouseOut
    $(".surface").mouseover(function(){
        flag = false;
        var imgUrl = $(this).attr("surface_img");
        var imgHtml = "";
        if(imgUrl){
            imgHtml = "<img src='" + imgUrl + "' style='width:100%;height:100%'/>";
            //捕获页
            var index =layer.open({
                closeBtn:0,//将关闭按钮去掉
                type:1,
                shade: false,
                title: false, //不显示标题
                area: [600+'px', 480+'px'],
                content: imgHtml, //捕获的元素，注意：最好该指定的元素要存放在body最外层，否则可能被其它的相对元素所影响
            });
        }
    });
    $(".surface").mouseout(function() {
        flag = true;
        layer.close(layer.index);
    });
</script>
{/block}